{% load static %}
<head>
    <link rel='stylesheet preload' href="{% static 'css/user1.css' %}" type='text/css' media='all'/>
</head>
<div class="main">

    <h2 class="form-signin-heading text-center">注册</h2>

    <div class="row">

        <form class="form-signin" action="{% url 'user:register' %}" method="post">
            {% csrf_token %}
            <div class="input-prepend restyle">
                <span>
                <img src="{% static 'user/img/user.png' %}" height="18" width="18" alt="">
                </span>
                <input placeholder="邮箱" type="text" value="{{email}}" name="email"
                       id="email">
                <div class="login-error">
                    {% if error_msg.user_exist %}
                         {{error_msg.user_exist}}
                    {% else %}
                        {{error_msg.email}}
                    {% endif %}
                </div>
            </div>
            <div class="input-prepend restyle">
                <span>
                <img src="{% static 'user/img/name.png' %}" height="18" width="18" alt="">
                </span>
                <input placeholder="昵称" type="text" value="{{name}}" name="name"
                       id="name">
                <div class="login-error">
                    {{error_msg.name}}
                </div>
            </div>
            <div class="input-prepend restyle">
                <img src="{% static 'user/img/password.png' %}" height="18" width="18" alt="">
                <input class="input-prepend restyle" value="{{password}}" placeholder="密码" type="password"
                       name="password"
                       id="password">
                <div class="login-error">
                        {{error_msg.password}}
                </div>
                <div class="login-error">

                </div>
            </div>

            <div>
                <button class="sign-up-button" type="submit">注册</button>
            </div>
        </form>
    </div>
</div>
